package com.example.apitest;

import com.xiaomi.mipush.sdk.MiPushClient;

import io.realm.Realm;
import io.realm.RealmConfiguration;

public class MyApplication extends com.example.common.MyApplication {

    @Override
    public void onCreate() {
        super.onCreate();
        MiPushClient.registerPush(this, "2882303761518946010", "5861894644010");
        //realm database
        Realm.init(this);
        RealmConfiguration config = new RealmConfiguration.Builder()
                .schemaVersion(1)
                .name("cityData")
//                .initialData(new Realm.Transaction() {
//                    @Override
//                    public void execute(Realm realm) {
//                        初始化数据库数据
//                    }
//                })
                .deleteRealmIfMigrationNeeded()
                .build();
        Realm.setDefaultConfiguration(config);
//        registerActivityLifecycleCallbacks();
    }



}
